package com.health.work.activity;

import com.health.work.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

/**
 * 专家自我介绍
 * 
 * @author star
 * 
 */
public class ExpertIntroduceActivity extends Activity {

	private Button back;
	private String introduce;
	private TextView intro;
	private Button Trusteeship;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.doctor_introduce_layout);
		initPages();
	}

	private void initPages() {

		back = (Button) findViewById(R.id.btnBack);
		intro = (TextView) findViewById(R.id.introduce);
		Trusteeship=(Button)findViewById(R.id.btn);
		Trusteeship.setVisibility(View.VISIBLE);
		Trusteeship.setText("托管");
		Trusteeship.setOnClickListener(onClickListener);
		back.setOnClickListener(onClickListener);
		Bundle bundle = getIntent().getExtras();
		if (bundle != null) {
			introduce = (String) bundle.getString("introduce");
			if (introduce != null && !introduce.equals("")) {
				intro.setText(introduce);
			} else {
				intro.setGravity(Gravity.CENTER);
				intro.setText("暂无介绍");
			}
		}
	}

	OnClickListener onClickListener = new OnClickListener() {

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			switch (v.getId()) {
			case R.id.btnBack:
				finish();
				break;
			case R.id.btn:
				Intent intent;
				intent=new Intent(ExpertIntroduceActivity.this,MyTrusteeShipActivity.class);
				startActivity(intent);
				break;
			default:
				break;
			}
		}

	};
}
